import request from '@/axios'

export const uploadFileApiApi = (data: any): Promise<IResponse> => {
  return request.post({ url: '/common/upload', data })
}
export const uploadFileApi = (data: any): Promise<IResponse> => {
  return request.post({ url: '/common/uploadFile', data, headers: { 'Content-Type': '' } })
}

export const getOssDirectUploadParams = (params: any): Promise<IResponse> => {
  return request.get({ url: '/common/getOssDirectUploadParams', params })
}

export const saveDirectUploadInfo = (data: any): Promise<IResponse> => {
  return request.post({ url: '/common/saveDirectUploadInfo', data })
}

// 批量上传
export const batchSaveDirectUploadInfo = (data: any): Promise<IResponse> => {
  return request.post({ url: '/common/batchSaveDirectUploadInfo', data })
}
